import request from '../../utils/request-product'
//1.获取一级分类的数据
//GET /admin/product/getCategory1
export const reqcategory1=()=>{
    return request({url:`/admin/product/getCategory1`,method:'get'})
}

//2.获取二级分类的数据
//GET /admin/product/getCategory2/{category1Id}
export const reqcategory2=(category1Id)=>{
    return request({url:`/admin/product/getCategory2/${category1Id}`,method:'get'})
}

//3.获取三级分类的数据
//GET /admin/product/getCategory3/{category2Id}
export const reqcategory3=(category2Id)=>{
    return request({url:`/admin/product/getCategory3/${category2Id}`,method:'get'})
}

//4.展示品牌属性接口
//GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export const reqcategoryList=(category1Id,category2Id,category3Id)=>{
    return request({url:`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,method:'get'})
}

//5.添加属性和属性值接口
//POST /admin/product/saveAttrInfo
export const reqAddandUpdateAttr=(attrInfo)=>{
    return request({url:`/admin/product/saveAttrInfo`,method:'post',data:attrInfo})
}

//6.删除属性名的接口
// DELETE /admin/product/deleteAttr/{attrId}
export const reqDeleteAttr=(attrId)=>{
    return request({url:`/admin/product/deleteAttr/${attrId}`,method:'delete'})
}

